﻿using Autofac;

namespace NeGroid.ChampionshipManager.Persistance
{
	public class PersistanceModule : Module
	{
		protected override void Load(ContainerBuilder builder)
		{
			builder.RegisterType<ChampionshipManagerDb>().As< ChampionshipManagerDb>();
			builder.RegisterGeneric(typeof(EfRepository<>)).As(typeof(IRepository<>)).InstancePerDependency();
			builder.RegisterGeneric(typeof(EfEntityRepository<>)).As(typeof(IEntityRepository<>)).InstancePerDependency();
		}
	}
}
